import { request } from '@umijs/max';
import { IResponseType } from './type';

export const getBillAllByDay = async (body: any, options?: any) => {

  return request('/api/bill/getBillAllByDay', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
};

export const getTransactionConfigAll = (params?: any, options?: any) => {
  return request('/api/transactionConfig/getAll', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    ...(options || {}),
  });
};

export const getBillAll = (body?: any, options?: any) => {
  return request('/api/bill/getBillAll', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
};

export const getBillStatistics = (body?: any, options?: any) => {
  return request('/api/bill/getBillStatistics', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
};

export const getDataByTransactionType = (body?: any, options?: any) => {
  return request('/api/bill/getDataByTransactionType', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
